﻿<?xml version="1.0" encoding="utf-8"?>
<developerOrientationDocument
  xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"
  xmlns:xlink="http://www.w3.org/1999/xlink">

  <content>
  	<para>The AeroGlassProvider also provides two events which fire when the Desktop
  		Window Manager changes it's composition (Aero properties). These two events are:</para>
  		
  	<list class="bullet">
  	<listItem><codeInline>AeroEnabledChanged</codeInline>: Fired when the Aero interface
  		is enabled and disabled. This can be fired if the user manually turns off Aero
  		or certain applications will automatically turn Aero off (Microsoft Flight 
  		Simulator does this).</listItem>
  	<listItem><codeInline>AeroColorChanged</codeInline>: Fired when the
  		user changes their Aero Window Color and Appearance in the screen
  		Personalization window.</listItem>
  	</list>
  	
  	<para>To catch the <inlineCode>AeroEnabledChanged</inlineCode> and
  		<inlineCode>AeroColorChanged</inlineCode> events you must have a 
  		<inlineCode>WndProc</inlineCode> method in your form similar to:</para>
  	
<code language="C#">
<![CDATA[
protected override void WndProc(ref Message message)
{
    base.WndProc(ref message);
    aeroGlassProvider.WndProc(this, ref message);
}
]]>
</code>

	<alert class="note">
  		<para>Microsoft Windows Vista does not fire the <inlineCode>AeroColorChanged</inlineCode> 
  			event when previewing a new color in the <ui>Personalization - Window Color and
  			Appearance</ui> window. The event is fired only when the OK button is pressed.</para>
	</alert>

	<para>AeroGlassProvider also contains some useful general purpose static methods and
		properties.</para>
  	<list class="bullet">
  	<listItem><codeInline>IsAeroEnabled</codeInline>: returns whether or
  		not the	Aero interface is enabled.</listItem>
  	<listItem><codeInline>GetAeroColor</codeInline>: returns the current
  		Aero interface color. This might be useful if you want to incorportate
  		the interface color into your Ux.</listItem>
  	<listItem><codeInline>IsAeroColorOpaque</codeInline>: returns whether
  		the current Aero interface color is Opaque (Alpha channel is set to 255).</listItem>
  	</list>
  	
  </content>

  <relatedTopics>
  </relatedTopics>
</developerOrientationDocument>
